package bean;

import org.litepal.crud.DataSupport;

/**
 * Created by Administrator on 2017/2/17.
 */

/*
 * 歌曲基本信息
 */
public class MP3Info extends DataSupport {
    // 列表序号
    private int id;
    // 文件名称
    private String fileName;
    // 歌名
    private String name;
    // 歌手
    private String artist;
    // 专辑
    private String album;
    // 播放时长 --> 333s
    private int duration;
    // 文件比特率--> Kbps
    private double  bitrate;
    // 文件采样率 --> KHz
    private double frequency;
    // 文件大小 --> MB
    private double size;
    // 歌词
    private String lyric;
    // 文件路径
    private String path;

    public MP3Info(int id, String fileName, String name, String artist, String album, int duration, double bitrate, double frequency, double size, String lyric, String path) {
        this.id = id;
        this.fileName = fileName;
        this.name = name;
        this.artist = artist;
        this.album = album;
        this.duration = duration;
        this.bitrate = bitrate;
        this.frequency = frequency;
        this.size = size;
        this.lyric = lyric;
        this.path = path;
    }

    public MP3Info() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getArtist() {
        return artist;
    }

    public void setArtist(String artist) {
        this.artist = artist;
    }

    public String getAlbum() {
        return album;
    }

    public void setAlbum(String album) {
        this.album = album;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public double getBitrate() {
        return bitrate;
    }

    public void setBitrate(double bitrate) {
        this.bitrate = bitrate;
    }

    public double getFrequency() {
        return frequency;
    }

    public void setFrequency(double frequency) {
        this.frequency = frequency;
    }

    public double getSize() {
        return size;
    }

    public void setSize(double size) {
        this.size = size;
    }

    public String getLyric() {
        return lyric;
    }

    public void setLyric(String lyric) {
        this.lyric = lyric;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MP3Info mp3Info = (MP3Info) o;

        return path != null ? path.equals(mp3Info.path) : mp3Info.path == null;

    }

    @Override
    public int hashCode() {
        return path != null ? path.hashCode() : 0;
    }
}
